import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import MyMusic from '@/views/MyMusic'
import Singer from '@/views/Singer'
import SongList from '@/views/SongList'
import Search from '../views/Search'
import Lyric from '../views/Lyric'
import SignUp from '@/views/SignUp'
import LoginIn from '@/views/LoginIn'
import Setting from '@/views/Setting'
import SingerAlbum from '@/views/SingerAlbum'
import SongListAlbum from '@/views/SongListAlbum'

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/my-music',
        name: 'my-music',
        component: MyMusic
    },
    {
        path: '/singer',
        name: 'singer',
        component: Singer
    },
    {
        path: '/song-list',
        name: 'song-list',
        component: SongList
    },
    {
        path: '/search',
        name: 'search',
        component: Search
    },
    {
        path: '/lyric',
        name: 'lyric',
        component: Lyric
    },
    {
        path: '/sign-up',
        name: 'sign-up',
        component: SignUp
    },
    {
        path: '/login-in',
        name: 'login-in',
        component: LoginIn
    },
    {
        path: '/setting',
        name: 'setting',
        component: Setting
    },
    {
        path: '/singer-album/:id',
        name: 'singer-album',
        component: SingerAlbum
    },
    {
        path: '/song-list-album/:id',
        name: 'song-list-album',
        component: SongListAlbum
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
